<?php include'views/templates/layouts/'.$this->layout.'/header.php'; ?>
    <!--Messager-->
<?php
$messager="true";
if($messager!="")
{
    ?>
    <br>
    <div class="alert alert-success">
        <button class="close" data-dismiss="alert">×</button>
        <strong>Success!</strong> The page has been added.
    </div>
<?php
}
?>

    <!--End Messager-->
    <div class="widget-box">
        <div class="widget-title">

            <h5>List repost</h5>
            <h5> <a href="index.php?controller=articles&action=add">Add record!</a></h5>
        </div>
        <div class="widget-content nopadding">
            <table class="table table-bordered table-striped table-hover data-table">
                <thead>
                <tr>
                    <th>Category Name</th>
                    <th>Description</th>
                </tr>
                </thead>
                <tbody>
                <?php
                if($listcat==null){
                    echo "<p>Dữ liệu trống</p>";
                }
                else{
                    while($row = mysqli_fetch_array($listcat))
                    {

                        ?>
                        <tr class="gradeX">
                            <td><?php echo $row['catname']; ?></td>
                            <td><?php echo $row['des']; ?></td>
                            <td class="taskOptions">
                                <a href="#" class="tip-top" data-original-title="View"><i class="icon-th"></i></a>
                                <a href="index.php?controller=FileUploads&action=editcat&id=<?php echo $row['id']; ?>" class="tip-top" data-original-title="Edit"><i class="icon-edit"></i></a>
                                <a href="index.php?controller=FileUploads&action=delcat&id=<?php echo $row['id']; ?>" class="tip-top" data-original-title="Delete"><i class="icon-remove"></i></a>
                            </td>
                        </tr>
                    <?php
                    }}
                ?>
                </tbody>
            </table>
        </div>
    </div>
    </div>
    </div>


<?php include'views/templates/'.$this->layout.'/footer.php'; ?>